<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
  String _id=request.getParameter("_");
%>
<div class="jqGrid_wrapper">
  <table id="dialog_member_table"></table>
  <div id="dialog_member_page"></div>
</div>

<script>

  $(function(){

    // 加载数据
    init_grid_dialog_member();

  });

  // 初始化表单数据
  function init_grid_dialog_member() {

    __init_jqgrid('dialog_member_table', 'dialog_member_page',
            '<%=path%>/main/member/list',
            ['成员名称', 'id'],
            [
              {name: 'name', index: 'name', width: 60, sortable:true, stype: 'text', searchoptions: {sopt: ['cn']}},
              {name: 'id', index: 'id', width: 100, key: true, hidden: true, hidedlg: true}
            ],
            true,
            {
              autowidth: false,
              width: 538
            }
    );

  }

  function fn_dialog_member_select(callback) {
    var rowId = $('#dialog_member_table').jqGrid('getGridParam', 'selrow');
    if (rowId) {
      callback($('#dialog_member_table').jqGrid('getRowData', rowId));
    } else {
      //__toastr_warning('请选择一个成员');
      callback();
    }
  }

</script>